//
//  MeBaseViewCell.swift
//  SwitfTest
//
//  Created by runone02 on 2019/1/9.
//  Copyright © 2019年 liqiyun. All rights reserved.
//

import UIKit

class MeBaseViewCell: UITableViewCell {
    var nameLabel : UILabel!
    var nameImage : UIImageView!
    var testLabel : UILabel!
    
    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
    }
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.selectionStyle = UITableViewCell.SelectionStyle(rawValue: 0)!
        self.separatorInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
        self.setUpUI()
    }
    
    func setUpUI() {
        nameImage = UIImageView()
        nameImage.backgroundColor = UIColor.black
        self.addSubview(nameImage)
        nameImage.mas_makeConstraints { (make) in
            make?.centerY.mas_equalTo()(self)
            make?.top.mas_equalTo()(10)
            make?.bottom.mas_equalTo()(-10)
            make?.left.mas_equalTo()(10)
            make?.width.mas_equalTo()(50)
        }
        
        nameLabel = UILabel()
        nameLabel.text = "UIColor.black"
        nameLabel.textColor = UIColor.black
        self.addSubview(nameLabel)
        nameLabel.mas_makeConstraints { (make) in
            make?.centerY.mas_equalTo()(self)
            make?.left.mas_equalTo()(nameImage.mas_right)?.offset()(10)
        }
        testLabel = UILabel()
//        testLabel.text = "使用"
        testLabel.textColor = UIColor.black
        self.addSubview(testLabel)
        testLabel.mas_makeConstraints { (make) in
            make?.centerY.mas_equalTo()(self)
            make?.right.mas_equalTo()(self)?.offset()(-10)
        }
        
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    

}
